function objectToQuery(obj) {
	return Object.keys(obj).map(key =>
		`${encodeURIComponent(key)}=${obj[key]}`
	).join('&');
}

// 消息跳转
export function msgJump(item) {
	let userInfo = uni.getStorageSync('userInfo')
	let path = '';
	let query = {};
	switch (Number(item.mark)) {
		case 480: //客户经理提交定金
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id
			}
			break;
		case 485: //拒绝定金
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id
			}
			break;
		case 490: //同意定金
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id
			}
			break;
		case 499: //财务驳回--增项款待标记
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id
			}
			break;

		case 510: //客户创建项目(需要分配客户经理)--客户总监
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id
			}
			break;
		case 520: //客户总监分配客户经理(需要完善项目)--客户经理
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id
			}
			break;
		case 530: //提前进场  分配工程经理
			if (userInfo.position_id == 2) {
				path = '/pagesB/designManagementDetail/designManagementDetail';
			} else {
				path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			}
			query = {
				id: item.project_id
			}
			break;
		case 535: //提交勘场费
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 0
			}
			break;
		case 540: //客户经理提交勘场费用(需要确认勘场费用信息)--财务
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 545: //财务拒绝勘场费
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 550: //财务确认勘场费用(需要分配勘场工程经理)--工程部经理
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 560: //工程部经理分配完勘场工程经理(需要提交勘场报告)--工程经理
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 570: //工程经理提交勘场报告(需要提交勘场资料)--设计师
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 580: //设计师提交勘场资料(需要上传设计图)--设计师，造价员，客户经理
			path = '/pagesB/designManagementDetail/designManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 590: //上传完设计图(需要申请报价)--客户经理
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 600: //分配施工工程经理--工程部经理
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 605: //分配造价员--造价主管
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 610: //出具造价单--造价员
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 620: //工程部经理分配了工程经理--工程经理无需操作
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 625: //工程经理拒绝指派
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 630: //审核造价单--工程经理
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 640: //审核拒绝造价单--造价员
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 650: //工程经理通过造价单
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 660: //造价主管通过造价单
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 670: //客户经理对客报价
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 680: //客户经理发起优惠审批
			path = '/pagesB/discountApprovalDetail/discountApprovalDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 682: //客户总监审核拒绝
			path = '/pagesB/discountApprovalDetail/discountApprovalDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 684: //客户总监审核通过，等待总经理审批
			path = '/pagesB/discountApprovalDetail/discountApprovalDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 686: //总经理审批拒绝
			path = '/pagesB/discountApprovalDetail/discountApprovalDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 688: //总经理审批同意，审核完成
			path = '/pagesB/discountApprovalDetail/discountApprovalDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 695: //客户经理去提交付款信息
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 1
			}
			break;
		case 700: //提交预付款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 705: //财务拒绝预付款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 710: //监理开工
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 720: //现场启动
			path = '/pagesA/engineeringManagement/engineeringManagement'
			query = {
				project_name: item.project_name,
				tabIndex: 3
			}
			break;
		case 730: //提交节点验收
			path = '/pagesA/engineeringManagement/engineeringManagement'
			query = {
				project_name: item.project_name,
				tabIndex: 3
			}
			break;
		case 735: //节点提交进度款
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 3
			}
			break;
		case 740: //工程监理质量验收审核
			path = '/pagesA/engineeringManagement/engineeringManagement'
			query = {
				project_name: item.project_name,
				tabIndex: 3
			}
			break;
		case 750: //工程部经理质量验收审核
			path = '/pagesA/engineeringManagement/engineeringManagement'
			query = {
				project_name: item.project_name,
				tabIndex: 3
			}
			break;
		case 752: //确认增减项信息
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 755: //质量评分
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 762: //工程监理发起整改单
			path = '/pagesB/engineeringRectificationDetail/engineeringRectificationDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 763: //工程经理提交整改内容
			path = '/pagesB/engineeringRectificationDetail/engineeringRectificationDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 764: //工程监理整改单审核不通过
			path = '/pagesB/engineeringRectificationDetail/engineeringRectificationDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 765: //工程监理整改单审核通过
			path = '/pagesB/engineeringRectificationDetail/engineeringRectificationDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 770: //提交进度款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 775: //拒绝进度款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 780: //确认进度款(节点验收完毕)
			path = '/pagesA/engineeringManagement/engineeringManagement'
			query = {
				project_name: item.project_name,
				tabIndex: 3
			}
			break;
		case 785: //施工完成
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 790: //确认增减项
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 800: //出具结算单
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 810: //拒绝结算单
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 820: //同意结算单
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 825: //结算单通过，客户经理去提交尾款信息
			path = '/pagesB/projectDetail/projectDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 830: //提交尾款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 834: //同意优惠
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 3
			}
			break;
		case 838: //拒绝尾款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 840: //同意尾款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 842: //同意尾款
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 844: //总经理审核
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 846: //总经理审核
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 848:
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 862: //上传勘场资料
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 864: //重新指派造价员
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
		case 866: //重新指派施工工程经理
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail';
			query = {
				id: item.project_id,
			}
			break;
			// **************增减项*********************
		case 900: //待报价
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 905: //待报价
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 910: //重新分配造价员
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 920: //出具增减项报价
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 930: //报价拒绝
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 940: //增减项报价工程经理同意
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 950: //提交增减项支付
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 4
			}
			break;
		case 955: //拒绝增减项支付
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 960: //同意增减项支付
			path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail';
			query = {
				id: item.object_id,
			}
			break;
			// *************售后******************
		case 970: //客户经理发起售后
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 972: //客户发起售后
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 975: //分配工程经理
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 980: //工程经理反馈现场情况
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 985: //工程监理处理反馈
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 990: //工程经理提交完成情况
			path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
			// //***********付款单*********** */
		case 1101:
			path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 1102:
			path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 1103:
			path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 1104:
			path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
		case 1105:
			path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail';
			query = {
				id: item.object_id,
			}
			break;
	}

	if (!path) return
	return path + '?' + objectToQuery(query)
}

// 项目相关
function dbProject(item) {
	let userInfo = uni.getStorageSync('userInfo')
	let path = '';
	let query = {};
	switch (Number(item.status)) {
		case 1000: // 客户项目已创建,等待客户总监分配客户经理
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1010: // 客户总监已分配客户经理,等待客户经理选择勘场
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1015: // 客户经理选择无需勘场，等待客户经理或客户提交设计图
			path = '/pagesB/designManagementDetail/designManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1020: // 客户经理选择需要勘场，等待客户经理提交勘场费用信息
			path = '/pagesA/financialManagement/financialManagement';
			query = {
				// project_id: item.project_id,
				// object_id: item.object_id,
				// pay_type_idx: 0,
				tabIndex: 0,
				project_name: item.project_name
			}
			break;
		case 1025: // 客户经理已提交勘场费用信息，等待财务确认勘场费用信息
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail'
			query = {
				id: item.object_id
			}
			break;
		case 1030: // 财务已确认勘场费用信息，等待工程部经理分配勘场工程经理
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1045: // 工程部经理已分配勘场工程经理，等待勘场工程经理提交勘场报告
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1055: // 工程经理已提交勘场报告，等待设计师上传勘场资料
			path = '/pagesB/siteSurveyManagementDetail/siteSurveyManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1060: // 设计师已上传勘场资料，等待客户经理或客户提交设计图
			path = '/pagesB/designManagementDetail/designManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1065: // 客户或客户经理已上传设计图，等待客户经理申请报价
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1070: // 客户经理已提交报价申请，等待分配造价员和分配施工工程经理
			if (userInfo.position_id == 4) {
				// 造价主管
				path = '/pagesB/budgetManagementDetail/budgetManagementDetail'
				query = {
					id: item.project_id
				}
			} else {
				// 工程部经理
				path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
				query = {
					id: item.project_id
				}
			}
			break;
		case 1080: // 造价主管已分配造价员，等待造价员报价
			if (userInfo.position_id == 5) {
				// 造价员
				path = '/pagesB/budgetManagementDetail/budgetManagementDetail'
				query = {
					id: item.project_id
				}
			} else {
				// 工程部经理
				path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
				query = {
					id: item.project_id
				}
			}
			break;
		case 1090: // 造价员已出具报价单，等待工程经理审核
			if (userInfo.position_id == 6) {
				// 工程部经理
				path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
				query = {
					id: item.project_id
				}
			} else {
				// 工程经理审核报价单跳详情
				path = '/pagesB/budgetManagementDetail/budgetManagementDetail'
				query = {
					id: item.project_id
				}
			}
			break;
		case 1092: // 工程经理审核通过，等待造价主管审核
			path = '/pagesB/budgetManagementDetail/budgetManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1095: // 造价主管审核通过，等待客户经理对客报价
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1100: // 客户经理完成客户报价，待客户经理提交合约 -- todo:应该跳合同添加页
			path = '/pagesA/saleManagement/saleManagement'
			query = {
				tabIndex: 3
			}
			break;
		case 1102: // 【已废弃】.优惠审批已完成
			console.log('不是废弃了么')
			break;
		case 1105: // 客户经理提交合约信息，等待客户经理提交预付款信息
			path =
				'/pagesA/financialManagement/financialManagement'; ///pagesC/collectionManagement/addReceivePayment/addReceivePayment
			query = {
				// project_id: item.project_id,
				// object_id: item.object_id,
				// pay_type_idx: 1,
				tabIndex: 0,
				project_name: item.project_name
			}
			break;
		case 1110: // 客户经理已提交预付款信息，等待财务确认预付款信息
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail'
			query = {
				id: item.object_id
			}
			break;
		case 1115: // 财务已确认预付款信息，等待工程监理启动
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1120: // 施工中,交进度款
			path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
			query = {
				project_id: item.project_id,
				object_id: item.object_id,
				pay_type_idx: 2
			}
			break;
		case 1125: // 已完工，等待客户经理发起结算单(确认增减项)
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1130: // 客户经理已确认增减项，等待造价员出具项目结算单
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1135: // 造价员已出具项目结算单，等待工程经理审核
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1138: // 工程经理审核通过，等待造价主管审核
			path = '/pagesB/settlementManagementDetail/settlementManagementDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1140: // 造价主管审核已通过，等待客户经理提交尾款信息
			if (item.current_node == '客户经理提交尾款') {
				path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
				query = {
					project_id: item.project_id,
					object_id: item.object_id,
					pay_type_idx: 3
				}
			} else {
				// 重新提交尾款
				path = '/pagesA/financialManagement/financialManagement'
				query = {
					project_name: item.project_name,
					tabIndex: 0
				}
			}
			break;
		case 1145: // 客户经理已提交尾款信息，等待财务确认尾款信息（正常流程时存在）
			path = '/pagesB/collectionManagementDetail/collectionManagementDetail'
			query = {
				id: item.object_id
			}
			break;
		case 1150: // 财务已确认尾款信息，项目完成
			path = '/pagesB/projectDetail/projectDetail'
			query = {
				id: item.project_id
			}
			break;
		case 1155: // 用户已完成评价
			path = '/pagesB/projectRatingDetail/projectRatingDetail'
			query = {
				id: item.project_id
			}
			break;
	}
	if (!path) return
	return path + '?' + objectToQuery(query)
}
// 增减项相关
function dbZjx(item) {
	let path = '';
	let query = {};
	path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	query = {
		id: item.object_id,
	}
	// switch (Number(item.object_status)) {
	// 	case 10: // 客户经理或工程经理发起，待造价员报价
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 20: // 造价员已报价,等待工程经理初审
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 25: // 工程经理拒绝
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 30: // 工程经理审核通过,等待造价主管复审
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 35: // 造价主管拒绝
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 40: // 造价主管审核通过,等待客户经理复审
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 45: // 客户经理审核拒绝
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 60: // 客户经理审核通过，流程结束
	// 		path = '/pagesB/increaseDecreaseItemsDetail/increaseDecreaseItemsDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// }
	// if (!path) return
	return path + '?' + objectToQuery(query)
}
// 售后相关
function dbAfter(item) {
	let path = '';
	let query = {};
	path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	query = {
		id: item.object_id,
	}
	// switch (Number(item.object_status)) {
	// 	case 10: // 待分配工程监理
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 20: // 已分配工程监理,待分配工程经理
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 30: // 已分配工程经理,待工程经理反馈现场情况
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 40: // 工程经理已反馈,待工程监理处理反馈
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 50: // 工程监理已处理反馈,待工程经理提交完成情况
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 60: // 工程经理提交完成信息
	// 		path = '/pagesB/afterSalesManagementDetail/afterSalesManagementDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// }
	// if (!path) return
	return path + '?' + objectToQuery(query)
}
// 优惠审批相关
function dbDiscountApproval(item) {
	let path = '';
	let query = {};
	path = '/pagesB/discountApprovalDetail/discountApprovalDetail'
	query = {
		id: item.object_id,
	}
	// switch (Number(item.object_status)) {
	// 	case 10: // 待客户总监审核
	// 		path = '/pagesB/discountApprovalDetail/discountApprovalDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// 	case 20: // 客户总监审核通过，等待总经理审核
	// 		path = '/pagesB/discountApprovalDetail/discountApprovalDetail'
	// 		query = {
	// 			id: item.object_id,
	// 		}
	// 		break;
	// }
	// if (!path) return
	return path + '?' + objectToQuery(query)
}
// 施工相关
function dbConstruction(item) {
	let userInfo = uni.getStorageSync('userInfo')
	let path = '';
	let query = {};
	switch (Number(item.object_status)) {
		case 30: // 待进场（未开始，无需操作）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 35: // 待进场（待分配施工工程经理）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 40: // 待进场（已分配施工工程经理和工程监理，默认不能开工，【如果是提前进场或者已支付定金则可以开工，进入42】）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 42: // 待进场（允许工程监理启动现场、允许开工）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 45: // 施工中（工程监理已启动(点击开工后)，进入施工中）
			// 待提交进度凭证（客户经理）
			if (userInfo.position_id == 2) {
				path = '/pagesC/collectionManagement/addReceivePayment/addReceivePayment';
				query = {
					project_id: item.project_id,
					object_id: item.object_id,
					pay_type_idx: 2
				}
			} else {
				path = '/pagesA/engineeringManagement/engineeringManagement'
				query = {
					// id: item.object_id,
					project_name: item.project_name,
					tabIndex: 3
				}
			}
			break;
		case 50: // 已完工（完工验收通过）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 60: // 质保中（结算完成）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
		case 70: // 质保到期（超过质保期限）
			path = '/pagesB/constructionManagementDetail/constructionManagementDetail'
			query = {
				id: item.project_id,
			}
			break;
	}
	return path + '?' + objectToQuery(query)
}
// 收款单相关
function dbDjFunc(item) {
	let path = '/pagesB/collectionManagementDetail/collectionManagementDetail'
	let query = {
		id: item.object_id,
	}
	return path + '?' + objectToQuery(query)
}
// 付款单相关
function dbPayOrderFunc(item) {
	let path = '/pagesB/attachmentManagementDetail/attachmentManagementDetail'
	let query = {
		id: item.object_id,
	}
	return path + '?' + objectToQuery(query)
}
// 整改单相关
function dbzgOrderFunc(item) {
	let path = '/pagesB/engineeringRectificationDetail/engineeringRectificationDetail'
	let query = {
		id: item.object_id,
	}
	return path + '?' + objectToQuery(query)
}

// 待办跳转
export function toDoJump(item) {
	switch (item.type) {
		case 1:
			return dbProject(item)
		case 2:
			return dbZjx(item)
		case 3:
			return dbAfter(item)
		case 4:
			return dbDiscountApproval(item)
		case 5:
			return dbConstruction(item)
		case 6:
			return dbDjFunc(item)
		case 7:
			return dbPayOrderFunc(item)
		case 8:
			return dbzgOrderFunc(item)
	}
}